package tests;
import junit.framework.Assert;
import model.Problem;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import util.Importer;

/**
 *
 * @author chris
 */
public class ImporterTest {

	Importer importer;
	Problem problem;

	public ImporterTest() {
	}

	@BeforeClass
	public static void setUpClass() throws Exception {

	}

	@AfterClass
	public static void tearDownClass() throws Exception {
	}

	@Before
	public void setUp() {
		importer = new Importer("datasets//model_a1_1.txt");
		problem = importer.getProblem();
	}

	@After
	public void tearDown() {
		importer = null;
		problem = null;
	}

	/**
	 * Test of readData method, of class Importer.
	 */
	@Test
	public void readData() {
		importer.readData();
		Assert.assertEquals(4, problem.getMachines().size());
		Assert.assertEquals(2, problem.getResources().size());
	}
}
